package com.aiti.lulian.scheduled;

import com.aiti.lulian.gxmh.service.GovArticleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * description: 获取省工信厅文件
 * auth fcb
 * date 2025-06-12 11:04
 **/
@Service
@Slf4j
public class GovArticleScheduled {

    @Autowired
    private GovArticleService govArticleService;

    @Scheduled(cron = "0 10 2 ? * *")
    public void requestListPage1() {
        log.info("开始获取省工信厅文件--规范性文件...");
        govArticleService.requestListPage("规范性文件", "1");
        log.info("获取省工信厅规范性文件文件结束...");
    }

    @Scheduled(cron = "0 20 2 ? * *")
    public void requestListPage2() {
        log.info("开始获取省工信厅文件--其他文件...");
        govArticleService.requestListPage("其他文件", "1");
        log.info("获取省工信厅其他文件结束...");
    }

    @Scheduled(cron = "0 30 2 ? * *")
    public void requestListPage3() {
        log.info("开始获取省工信厅文件--规范性文件清理...");
        govArticleService.requestListPage("规范性文件清理", "1");
        log.info("获取省工信厅规范性文件清理结束...");
    }

    @Scheduled(cron = "0 40 2 ? * *")
    public void requestListPage4() {
        log.info("开始获取省工信厅文件--政策解读...");
        govArticleService.requestListPage("政策解读", "1");
        log.info("获取省工信厅规政策解读结束...");
    }

}
